package models

import (
	"database/sql"
)

// WzjCustomerInfo 客户信息表
type WzjCustomerInfo struct {
	Id                        int64        `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT;comment:自增id" json:"id"`
	UnifySocialCreditCode     string       `gorm:"column:unify_social_credit_code;type:varchar(255);comment:统一社会信用代码;NOT NULL" json:"unify_social_credit_code"`
	CustomerAccount           string       `gorm:"column:customer_account;type:varchar(255);comment:客户账户，便于登录使用" json:"customer_account"`
	CustomerCode              string       `gorm:"column:customer_code;type:varchar(255);comment:客户编号" json:"customer_code"`
	CustomerPwd               string       `gorm:"column:customer_pwd;type:varchar(255);comment:客户密码;NOT NULL" json:"customer_pwd"`
	CustomerName              string       `gorm:"column:customer_name;type:varchar(255);comment:客户姓名;NOT NULL" json:"customer_name"`
	CustomerStatus            int32        `gorm:"column:customer_status;type:int(11);comment:客户状态;NOT NULL" json:"customer_status"`
	CustomerType              int32        `gorm:"column:customer_type;type:int(11);comment:客户类型(1-客户，2-当事人);NOT NULL" json:"customer_type"`
	CustomerAddress           string       `gorm:"column:customer_address;type:varchar(255);comment:客户地址;NOT NULL" json:"customer_address"`
	CustomerMobile            string       `gorm:"column:customer_mobile;type:varchar(255);comment:客户电话;NOT NULL" json:"customer_mobile"`
	CustomerFax               string       `gorm:"column:customer_fax;type:varchar(255);comment:客户传真;NOT NULL" json:"customer_fax"`
	CustomerFromId            int32        `gorm:"column:customer_from_id;type:int(11);comment:客户来源id" json:"customer_from_id"`
	CustomerFrom              string       `gorm:"column:customer_from;type:varchar(255);comment:客户来源;NOT NULL" json:"customer_from"`
	CustomerShare             int32        `gorm:"column:customer_share;type:int(11);comment:客户是否分享;NOT NULL" json:"customer_share"`
	CustomerLevel             int32        `gorm:"column:customer_level;type:int(11);comment:客户等级;NOT NULL" json:"customer_level"`
	CustomerAccountManagersId int32        `gorm:"column:customer_account_managers_id;type:int(11);comment:客户管理人id" json:"customer_account_managers_id"`
	CustomerAccountManagers   string       `gorm:"column:customer_account_managers;type:varchar(255);comment:客户管理人;NOT NULL" json:"customer_account_managers"`
	CustomerOwner             int32        `gorm:"column:customer_owner;type:int(11);comment:客户归属-创建客户人。(0-自主注册，非0-注册人id);NOT NULL" json:"customer_owner"`
	CreateDate                int64        `gorm:"column:create_date;type:bigint(20);comment:时间戳-创建时间;NOT NULL" json:"create_date"`
	UpdateDate                sql.NullTime `gorm:"column:update_date;type:timestamp;default:CURRENT_TIMESTAMP;comment:时间戳-最后更新时间" json:"update_date"`
	IsEnabled                 int32        `gorm:"column:is_enabled;type:int(11);default:1;comment:是否有效(0-无效，1-有效)" json:"is_enabled"`
}

func (m *WzjCustomerInfo) TableName() string {
	return "wzj_customer_info"
}
